import React from 'react';
import { checkPermission } from '../common/permission';
import { Containerization} from '../common/PublicComponent';
@Containerization(state=>({
  roles:state.GlobalReducer.roles,
}))
export default class RoleBtn extends React.Component{

  render(){
    const {permission,children,text = '',roles} = this.props;
    const per = checkPermission(permission,roles)
    return <div style={{display:'inline-block'}}>
      {per?children:text}
      {/*{children}*/}
      </div>
  }
}